<template>
  <div class="crud-opts">
    <span class="crud-opts-left">
      <!--左侧插槽-->
      <slot name="left" />
      <el-button
   
      
        class="filter-item"

        type="primary"
        :icon="DocumentAdd"
        @click="crud.toAdd"
      >
        新增
      </el-button>
   <el-button

        class="filter-item"
  
        type="success"
     :icon="Edit"
               
          :disabled="crud.selections.length !== 1"
        @click="crud.toEdit(crud.selections[0])"
     
      >
        修改
      </el-button>
      <el-button
  
        slot="reference"
      
        class="filter-item"
        type="danger"
        :icon="Delete"
             
          :disabled="crud.selections.length === 0"
        @click="toDelete(crud.selections)"
      >
        删除
      </el-button>
      <el-button
      
   
        class="filter-item"
 
        type="warning"
        :icon="Download"
    
      >导出</el-button>
      <!--右侧-->
 
      <!--右侧-->
      <slot name="right" />
    </span>
 
  </div>
</template>
<script lang="ts" setup>
import { crud,toDelete } from '/@/crud/crud'
import { Delete, Edit, DocumentAdd, Download, Upload } from '@element-plus/icons-vue'

</script>

<style>
 
</style>
